package com.hkemmm.shop.service.impl;

import com.hkemmm.shop.dao.UserMapper;
import com.hkemmm.shop.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService implements com.hkemmm.shop.service.UserService {

    @Autowired
    private UserMapper userMapper;


    @Override
    public User selectByPrimaryKey(Integer id) {
        return userMapper.selectByPrimaryKey(id);
    }

    @Override
    public User selectUser(String username, String password) {
        return userMapper.selectUser(username, password);
    }

    @Override
    public int updateByPrimaryKeySelective(User record) {
        return userMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public Integer insertSelective(User user) {
        return userMapper.insertSelective(user);
    }

    @Override
    public User existUser(String username) {
        return userMapper.existUser(username);
    }

    @Override
    public int updatePhoto(String photo, Integer id) {
        return userMapper.updatePhoto(photo, id);
    }

    @Override
    public List<User> getAllUser() {
        return userMapper.getAllUser();
    }
}
